/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package minemapgenerator;

import java.awt.GridLayout;
import java.awt.Point;
import javax.swing.JPanel;
import util.GameSettings;

/**
 *
 * @author CodeBlue
 */

// create panel that store the map
public class GenPanel extends JPanel {
    public GenPanel() {
        int rows = GameSettings.NUM_OF_ROWS;
        int cols = GameSettings.NUM_OF_COLS;
        setLayout(new GridLayout(rows, cols));
        for (int i = 0; i < rows; i++) {
            for(int j = 0; j< cols; j++) {
                MyButton myButton = new MyButton(" ");
                myButton.setPoint(new Point(i, j));
                add(myButton);
            }
        }
    }
}
